Learning To Control Safety-Critical Systems